<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateStockStockTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateStockStockLabel_id}" for="id" />
                    <h:inputText id="id" value="#{stockStockController.selected.id}" title="#{bundle.CreateStockStockTitle_id}" required="true" requiredMessage="#{bundle.CreateStockStockRequiredMessage_id}"/>
                    <h:outputLabel value="#{bundle.CreateStockStockLabel_quantidadeMaxima}" for="quantidadeMaxima" />
                    <h:inputText id="quantidadeMaxima" value="#{stockStockController.selected.quantidadeMaxima}" title="#{bundle.CreateStockStockTitle_quantidadeMaxima}" required="true" requiredMessage="#{bundle.CreateStockStockRequiredMessage_quantidadeMaxima}"/>
                    <h:outputLabel value="#{bundle.CreateStockStockLabel_quantidadeAtual}" for="quantidadeAtual" />
                    <h:inputText id="quantidadeAtual" value="#{stockStockController.selected.quantidadeAtual}" title="#{bundle.CreateStockStockTitle_quantidadeAtual}" required="true" requiredMessage="#{bundle.CreateStockStockRequiredMessage_quantidadeAtual}"/>
                    <h:outputLabel value="#{bundle.CreateStockStockLabel_quantidadeMinima}" for="quantidadeMinima" />
                    <h:inputText id="quantidadeMinima" value="#{stockStockController.selected.quantidadeMinima}" title="#{bundle.CreateStockStockTitle_quantidadeMinima}" required="true" requiredMessage="#{bundle.CreateStockStockRequiredMessage_quantidadeMinima}"/>
                    <h:outputLabel value="#{bundle.CreateStockStockLabel_detalhes}" for="detalhes" />
                    <h:inputText id="detalhes" value="#{stockStockController.selected.detalhes}" title="#{bundle.CreateStockStockTitle_detalhes}" />
                    <h:outputLabel value="#{bundle.CreateStockStockLabel_fkProduto}" for="fkProduto" />
                    <h:selectOneMenu id="fkProduto" value="#{stockStockController.selected.fkProduto}" title="#{bundle.CreateStockStockTitle_fkProduto}" required="true" requiredMessage="#{bundle.CreateStockStockRequiredMessage_fkProduto}">
                        <f:selectItems value="#{produtoStockController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{stockStockController.create}" value="#{bundle.CreateStockStockSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{stockStockController.prepareList}" value="#{bundle.CreateStockStockShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateStockStockIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
